Product Purchased API: productPurchased

The Product Purchased API retrieves historical product purchase data for a customer in the Real-time CDP. This API provides essential insights into the customer’s buying behavior, including product details, quantities, and order values.

API Endpoint and Method

URL Format

Copy
https://{B2B_API_URL}/api/v1/profile/b2b/productPurchased

Example URL

Copy
https://api-dev.algonomy.com/rcdpapi/api/v1/profile/b2b/productPurchased

HTTP Method

POST

Request Header Parameters

Parameter

Type Required or Optional

Description

access_token

String

Required

Specifies the access token obtained from the create access token API.
tenant_hash

String

Required

Specifies the tenant hash shared with the tenant.
gcrId String Required Specifies the Golden Customer Record ID (GCR ID).
mobile_number String Required

Specifies customer's mobile number.

Example: "1212121212"

email_address String Required

Specifies customer's email address.

Example: "customer@example.com"

customer_code_external

String

Required

Specifies the external customer code.

Example: "123456"

    Notes:
  • You can send all the parameters (gcrId, mobile_number, and email_address) with the request or just one, as at least one parameter is required.

  • These parameters are supported based on the configuration. If your deployment is configured to use them as columns for deduplication, they will be available for use in the API call.

Request Body

Only required for pagination. If using pagination, include parameters such as pageSize and a pointer (lastKey) to the last record from the previous page.

Copy
{
  "lastKey":{
      "HK_CUSTOMER_CODE":"1_1092",
      "RK_DATE_KEY":5
   },
“page”:1 ,
“pageSize”:100 
}

Response Body

A successful request returns a "200-OK" status code, accompanied by the retrieved data in the response.

Copy
{
  "status": "OK",
  "message": "",
  "data": {
    "customerId": 2056,
    "totalCount": 2,
    "currentPage": 1,
    "pageSize": 20,
    "totalPages": 1,
    "dataList": [
      {
        "productKey": 1,
        "productCode": "1000000873152",
        "productName": "NF-PO06:NAVY:11-12 Y",
        "productDescription": "NF-PO06:NAVY:11-12 Y",
        "productImgUrl": " ",
        "productQty": 1,
        "orderValue": "$100.30",
        "productValue": "$100.30",
        "orderDate": ""
      },
      {
        "productKey": 2,
        "productCode": "4900016873417",
        "productName": "71299:ORANGE:24",
        "productDescription": "71299:ORANGE:24",
        "productImgUrl": " ",
        "productQty": 10,
        "orderValue": "$1000.0",
        "productValue": "$100.0",
        "orderDate": " "
      }
    ],
    "data": null
  }
}